home *** CD-ROM | disk | FTP | other *** search
/ Tiger Disk 33 / Tiger_Disk_033_1996-12_Tiger-Crew-Disk_de_Side_B.d64 / disk-manager 4.0 (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  9KB  |  374 lines

  1. 21 o1=6501: m1=o1+1
  2. 22 o2=301 : m2=o2+1
  3. 25 dim di$(150),k(150)
  4. 26 dim si(4)
  5. 30 an=0
  6. 35 deffnh(x)=int(x/256)
  7. 36 deffnl(x)=x-256*fnh(x)
  8. 40 deffnm1(x)=x-(int(x/o1)*o1)+1
  9. 41 deffnm2(x)=x-(int(x/o2)*o2)+1
  10. 42 c1$=" [146][157]":c1=20
  11. 43 c2$=" [157]":  c2=2*c1
  12. 44 re$=""
  13. 45 hk$=chr$(34)
  14. 46 nu$=chr$(0)
  15. 47 df$="                "
  16. 48 dl$=chr$(254)+chr$(255)
  17. 90 goto 1000
  18. 98 rem   ----  "[200]ash-[198]unktion 1"  ----
  19. 100 id=0
  20. 101 le=len(id$):ifle=0thenid=1:return
  21. 102 fori=1tole
  22. 110 a$=mid$(id$,i,1)
  23. 130 id=fnm1(id*26+asc(a$))
  24. 140 next
  25. 150 return
  26. 198 rem   ----  "[200]ash-[198]unktion 2"  ----
  27. 200 di=0
  28. 201 le=len(di$):ifle=0thendi=1:return
  29. 202 fori=1tole
  30. 210 a$=mid$(di$,i,1)
  31. 230 di=fnm2(di*26+asc(a$))
  32. 240 next
  33. 250 return
  34. 298 rem ----  "[208]rogrammfile lesen"  ----
  35. 300 print#15,"p"chr$(2)chr$(fnl(id))chr$(fnh(id))chr$(1)
  36. 310 input#2,pr$
  37. 320 print#15,"p"chr$(2)chr$(fnl(id))chr$(fnh(id))chr$(18)
  38. 330 get#2,a1$,a2$,a3$,a4$,co$
  39. 340 di=asc(a1$+nu$)+256*asc(a2$+nu$)
  40. 345 ne=asc(a3$+nu$)+256*asc(a4$+nu$)
  41. 350 return
  42. 358 rem  ----  "[196]iskfile lesen"  ----
  43. 360 print#15,"p"chr$(2)chr$(fnl(di))chr$(fnh(di))chr$(1)
  44. 370 input#2,na$,in$
  45. 375 print#15,"p"chr$(2)chr$(fnl(di))chr$(fnh(di))chr$(25)
  46. 380 get#2,a1$,a2$,a3$,a4$
  47. 385 ne=asc(a1$+nu$)+256*asc(a2$+nu$)
  48. 387 fr=asc(a3$+nu$)+256*asc(a4$+nu$)
  49. 390 return
  50. 398 rem ---- "[208]rogfile schreiben" ----
  51. 400 print#15,"p"chr$(2)chr$(fnl(id))chr$(fnh(id))chr$(1)
  52. 410 print#2,id$
  53. 420 print#15,"p"chr$(2)chr$(fnl(id))chr$(fnh(id))chr$(18)
  54. 430 print#2,chr$(fnl(dn))chr$(fnh(dn))chr$(fnl(ko))chr$(fnh(ko))co$;
  55. 450 return
  56. 458 rem ---- "[196]iskfile schreiben" ----
  57. 460 print#15,"p"chr$(2)chr$(fnl(di))chr$(fnh(di))chr$(1)
  58. 470 print#2,di$","i$
  59. 475 print#15,"p"chr$(2)chr$(fnl(di))chr$(fnh(di))chr$(25)
  60. 480 print#2,chr$(fnl(ko))chr$(fnh(ko))chr$(fnl(fr))chr$(fnh(fr))
  61. 490 return
  62. 498 rem  ---- "[211]peicherinfo lesen" ----
  63. 500 open5,8,5,"#":gosub700
  64. 510 print#15,"b-r:" 5;0;18;0
  65. 520 print#15,"b-p:" 5;200
  66. 525 for si=0 to 4
  67. 530 get#5,a1$,a2$:si(si)=asc(a1$+nu$)+256*asc(a2$+nu$):next
  68. 535 close5:return
  69. 548 rem--- "[211]peicherinfo schreiben" ---
  70. 550 open5,8,5,"#":gosub700
  71. 555 print#15,"b-r:" 5;0;18;0
  72. 560 print#15,"b-p:" 5;200
  73. 565 for si=0 to 4
  74. 570 print#5,chr$(fnl(si(si)))chr$(fnh(si(si)));:next
  75. 575 print#15,"b-w:" 5;0;18;0
  76. 580 close5:return
  77. 598 rem  ----  "[201]rgendeine [212]aste"  ----
  78. 600 print:print"[215]eiter mit einer [212]aste: ";:gosub800:print:print:return
  79. 698 rem    ----  "[196]isk [197]rror"  ----
  80. 700 input#15,ds,ds$,tr,se
  81. 710 if(ds=0)or(ds=50)or(ds=51)thenreturn
  82. 720 print:print"[196]isk [197]rror:"ds;ds$;tr;se
  83. 730 close2:close15
  84. 740 gosub600:goto1000
  85. 798 rem  ----  "[212]astatureingabe"  ----
  86. 800 c=0
  87. 810 gete$:c=c+1:ifc=c1thenprintc1$;
  88. 820 ifc=c2thenprintc2$;:c=0
  89. 830 ife$=""thengoto810
  90. 840 printc2$;:return
  91. 898 rem       ----  "[212]itel"  ----
  92. 900 print"[147][155]";:fori=1to40:print"[192]";:next
  93. 910 print:print" [196]isk [205]anager [214]4.0 / [212]iger-[196]isk-[214]ersion"
  94. 930 print:fori=1to40:print"[192]";:next
  95. 940 print:print:return
  96. 998 rem      ----  "[200]auptmenue"  ----
  97. 1000 poke53280,0:poke53281,0:gosub900
  98. 1010 print"< 1 >  [208]rogramm suchen
  99. 1020 [153]"< 2 >  str$irectory einlesen & speichern
  100. 1025 print"< 3 >  [196]irectory listen
  101. 1026 [153]"< 4 >  str$irectory loeschen
  102. 1027 print"< 5 >  [208]rogramm loeschen
  103. 1028 [153]"< 6 >  (NULL)peicherinfo
  104. 1029 print"< 7 >  [206]eue [196]atendisk anlegen
  105. 1031 [153]"< 0 >  valnde"
  106. 1040 [153]"right$hre (NULL)ahl? ";
  107. 1045 [141]800:w$[178]e$
  108. 1050 [139]w$[178]"0"[167][153]:[153]"(w) 1985 by (NULL)homas (NULL)merzu.":[128]
  109. 1060 [145] [197](w$)[137]1200,6000,2000,3000,9000,8000,4000
  110. 1070 [137]1000
  111. 1198 [143]  ----  "(NULL)rogramm suchen"  ----
  112. 1200 [141]900:fl[178]0
  113. 1210 [159]15,8,15:[159]2,8,2,"progfile,l":[141]700
  114. 1220 [133]"(NULL)rogrammname";id$:[141]100:
  115. 1225 [141]300
  116. 1230 [139]pr$[178]id$[167]1300
  117. 1240 [139]pr$[178][199](255)[167][153]"(NULL)rogramm nicht vorhanden.":[137]1400
  118. 1250 id[178]id[170]1:[139]id[177]o1[167]id[178]1
  119. 1260 [137]1225
  120. 1300 [160]2
  121. 1310 [159]2,8,2,"diskfile,l"
  122. 1320 [141]360:[139]fl[167]1350
  123. 1330 [153]:[153]"str$as (NULL)rogamm "hk$id$hk$
  124. 1335 fl[178][171]1
  125. 1340 [153]"ist gespeichert auf de";
  126. 1345 [139]co$[178]"+"[167][153]"n str$isketten":[137]1350
  127. 1347 [153]"r str$iskette"
  128. 1350 [153]""hk$;na$;hk$" "in$
  129. 1360 [139]co$[179][177]"+"[167]1400
  130. 1370 [161]a$:[139]a$[178]""[167][160]2:[159]2,8,2,"progfile,l":[137]1250
  131. 1380 [153]"break.
  132. 1400 close2:close15
  133. 1410 gosub600:goto1000
  134. 1998 rem ----  "[196]irectory listen"  ----
  135. 2000 gosub900
  136. 2010 input"[196]iskname";di$
  137. 2020 di$=left$(di$+df$,16):gosub200
  138. 2030 open15,8,15:open2,8,2,"diskfile,l":gosub700
  139. 2040 gosub360:gosub700
  140. 2050 ifna$=di$then2100
  141. 2060 ifna$=chr$(255)then2090
  142. 2070 di=di+1:ifdi>o2thendi=1
  143. 2080 goto2040
  144. 2090 print"[196]irectory nicht gespeichert.":close2:close15:gosub600:goto1000
  145. 2100 print""hk$;di$;hk$" "in$
  146. 2110 close2
  147. 2120 open2,8,2,"progfile,l":gosub700
  148. 2130 ifne=0then2200
  149. 2135 geta$:ifa$<>""thenprint"break.":goto2210
  150. 2140 id=ne:gosub300
  151. 2150 print"  "hk$;pr$;hk$
  152. 2160 ifpr$=chr$(255)thenne=0
  153. 2170 goto2130
  154. 2200 printfr"[194]locks free.
  155. 2210 [160]2:[160]15:[141]600:[137]1000
  156. 2998 [143] ---- "str$irectory loeschen" ----
  157. 3000 [141]900
  158. 3010 [133]"str$iskname";di$
  159. 3020 di$[178][200](di$[170]df$,16):[141]200
  160. 3030 [159]15,8,15
  161. 3033 [141]500
  162. 3035 [159]2,8,2,"diskfile,l":[141]700
  163. 3040 [141]360:[141]700
  164. 3050 [139]na$[178]di$[167]3100
  165. 3060 [139]na$[178][199](255)[167]3090
  166. 3070 di[178]di[170]1:[139]di[177]o2[167]di[178]1
  167. 3080 [137]3040
  168. 3090 [153]"str$irectory nicht gespeichert.":[160]2:[160]15:[141]600:[137]1000
  169. 3100 [153]""hk$;di$;hk$" "in$
  170. 3120 [153]"< 1 >   str$irectory loeschen
  171. 3130 print"< 0 >   [218]urueck zum [200]auptmenue
  172. 3140 [153]"right$hre (NULL)ahl? ";
  173. 3150 [141]800
  174. 3160 [139]e$[178]"0"[167][160]2:[160]15:[137]1000
  175. 3170 [139]e$[179][177]"1"[167]3150
  176. 3180 [141]900:[153]"str$irectory wird geloescht..."
  177. 3185 si(0)[178]si(0)[170]1:si(1)[178]si(1)[171]1
  178. 3190 di$[178]dl$:[141]460:[160]2
  179. 3200 [159]2,8,2,"progfile,l":[141]700
  180. 3210 [139]ne[178]0[167][160]2:[141]550:[160]15:[137]1000
  181. 3215 si(3)[178]si(3)[170]1:si(4)[178]si(4)[171]1
  182. 3220 id[178]ne:[141]300
  183. 3230 id$[178]dl$:[141]400:[141]700:[139]co$[178]"+"[167]3210
  184. 3240 fl[178]id:id$[178]pr$:[141]100:[139]id[178]fl[167]3210
  185. 3245 n2[178]ne
  186. 3250 i2[178]id:id[178]fl
  187. 3260 id[178]id[171]1:[139]i2[177]id[167]3210
  188. 3270 [141]300:[139]pr$[179][177]id$[167]3260
  189. 3280 dn[178]di:ko[178]ne:co$[178]"-":[141]400:[141]700
  190. 3290 ne[178]n2:[137]3210
  191. 3998 [143]  ----  "(NULL)eue str$atendisk"  ----
  192. 4000 [141]900
  193. 4010 [153]"(NULL)egen (NULL)ie eine leere str$iskette ins (NULL)auf- werk."
  194. 4020 [153]"< 1 >   (NULL)eue str$atendisk anlegen
  195. 4030 print"< 0 >   [218]urueck zum [200]auptmenue
  196. 4040 [153]"right$hre (NULL)ahl? ";
  197. 4050 [141]800
  198. 4060 [139]e$[178]"0"[167]1000
  199. 4070 [139]e$[179][177]"1"[167]4050
  200. 4080 [141]900
  201. 4090 [153]"str$iskette wird formatiert...
  202. 4100 open15,8,15,"n0:disk manager,to"
  203. 4110 gosub700
  204. 4120 print:print"[208]rogramm wird abgespeichert..."
  205. 4130 save"disk manager 4.0",8
  206. 4140 gosub700
  207. 4150 print:print"[196]atenfile 1 wird angelegt..."
  208. 4160 open2,8,2,"progfile,l,"+chr$(22)
  209. 4170 gosub700
  210. 4172 print#15,"p"chr$(2)chr$(fnl(m1))chr$(fnh(m1))chr$(1)
  211. 4174 gosub700
  212. 4176 print#2,"end"
  213. 4178 gosub700
  214. 4180 close2
  215. 4190 print:print"[196]atenfile 2 wird angelegt..."
  216. 4200 open2,8,2,"diskfile,l,"+chr$(32)
  217. 4210 gosub700
  218. 4212 print#15,"p"chr$(2)chr$(fnl(m2))chr$(fnh(m2))chr$(1)
  219. 4214 gosub700
  220. 4216 print#2,"end"
  221. 4220 close2
  222. 4225 print:print"[211]peicherinfo wird angelegt..."
  223. 4230 si(0)=o2:si(1)=0
  224. 4240 si(2)=o1:si(3)=0:si(4)=0
  225. 4250 gosub550
  226. 4260 close15:goto1000
  227. 5997 rem ----  "[196]irectory lesen"  ----
  228. 6000 gosub900:co=0
  229. 6005 print"[196]irectory einlesen:
  230. 6006 [153]"peekitte legen (NULL)ie die str$iskette ins (NULL)auf-  werk.
  231. 6007 gosub600
  232. 6008 print:print:print
  233. 6010 open15,8,15,"i
  234. 6020 [159]2,8,0,"$0":[141]700
  235. 6021 [153]"atnlle asciles speichern? ";:
  236. 6022 [141]800:[139]e$[178]"j"[167]al[178][171]1:[137]6029
  237. 6023 [139]e$[179][177]"n"[167]6022
  238. 6024 al[178]0
  239. 6029 [153]e$:[153]:[153]
  240. 6030 [129]i[178]1[164]8:[161]#2,b$:[130]:di$[178]""
  241. 6031 [129]i[178]1[164]16:[161]#2,b$:di$[178]di$[170]b$:[130]:[153]""hk$di$hk$;:[161]#2,b$:i1$[178]""
  242. 6033 [129]i[178]1[164]6:[161]#2,b$:i1$[178]i1$[170]b$:[130]:[153]i1$:[161]#2,b$
  243. 6035 [161]#2,b$,c$:[139]st[179][177]0[167]6200
  244. 6040 [161]#2,b$,c$
  245. 6050 d[178]0
  246. 6060 [139] b$[179][177]"" [167] d[178][198](b$)
  247. 6070 [139] c$[179][177]"" [167] d[178]d[170][198](c$)[172]256
  248. 6080 n$[178]"":hk[178]0
  249. 6090 [161]#2,c$:[139] st[179][177]0 [167] 6200
  250. 6093 [139]c$[178]hk$[167]hk[178][168](hk)
  251. 6095 [139]hk[167]n$[178]n$[170]c$
  252. 6100 [139]c$[179][177]""[167]6090
  253. 6101 di$(co)[178][202](n$,2)
  254. 6110 [139] [195](di$(co))[178]0 [167]6120
  255. 6111 [153]"  "hk$di$(co)hk$:[139]al[167]6120
  256. 6112 [153]"on"re$"- (NULL)peichern? ";
  257. 6113 [141]800:[139]e$[179][177]"j"[175]e$[179][177]"n"[167]6113
  258. 6114 [153]:[153]"on"re$;
  259. 6115 [139]e$[178]"n"[167][153]"- (NULL)ein.     ":[137]6130
  260. 6116 [153]"- mid$a.       "
  261. 6120 co[178]co[170]1
  262. 6130 [139]st[178]0[167] [137]6035
  263. 6200 [160]2:[160]15
  264. 6205 [153]d"peeklocks free.
  265. 6210 :
  266. 6220 print"[194]itte legen [211]ie die [196][201][211][203] [205][193][206][193][199][197][210] -      [196]iskette ins [204]aufwerk.
  267. 6230 [141]600
  268. 6240 [141]900
  269. 6250 [159]15,8,15,"i":[141]500
  270. 6255 [139] si(0)[177]1 [175] si(2)[177]co [167] 6260
  271. 6257 [153]"(NULL)peicherung nicht moeglich."
  272. 6258 [153]"(NULL)peicherplatz erschoepft."
  273. 6259 [160]15:[141]600:[137]1000
  274. 6260 [159]2,8,2,"diskfile,l":[141]700
  275. 6270 [141]200
  276. 7024 [153]"str$aten werden gespeichert...":ml[178]48
  277. 7025 [141]360
  278. 7030 [139]na$[178]di$[167]di$[178][200](di$,14):ml[178]ml[170]1:di$[178]di$[170]"/"[170][199](ml):[137]7025
  279. 7040 [139]na$[178][199](255)[167]7200
  280. 7050 di[178]di[170]1:[139]di[177]o2[167]di[178]1
  281. 7060 [137]7025
  282. 7200 [139]ml[179][177]48[167][153]"atnlenleft$(NULL)(NULL)(NULL)chr$!: str$isk-(NULL)ame geaendert inwait":[153][163]12)" "di$"wait !"
  283. 7205 i$[178]i1$:ko[178]0:[141]460:[141]700
  284. 7210 [160]2
  285. 7211 si(0)[178]si(0)[171]1:si(1)[178]si(1)[170]1
  286. 7215 dn[178]di:[139]co[179][178]1[167]7620
  287. 7220 [159]2,8,2,"progfile,l":[141]700
  288. 7230 [129]i1[178]co[171]2[164]0[169][171]1
  289. 7320 id$[178]di$(i1):[153]hk$id$hk$:[141]100
  290. 7325 [141]300
  291. 7330 [139]pr$[178][199](255)[167]si(2)[178]si(2)[171]1:si(4)[178]si(4)[170]1:[137]7500
  292. 7340 [139]pr$[178]id$[167]7400
  293. 7345 [139]pr$[178]dl$[167]si(3)[178]si(3)[171]1:si(4)[178]si(4)[170]1:[137]7450
  294. 7350 id[178]id[170]1:[139]id[177]o1[167]id[178]1
  295. 7360 [137]7325
  296. 7400 [139]co$[178]"+"[167]7350
  297. 7405 n2[178]ko:d2[178]dn
  298. 7410 dn[178]di:ko[178]ne:co$[178]"+":[141]400:[141]700
  299. 7420 ko[178]n2:dn[178]d2:mi[178][171]1:[137]7350
  300. 7450 [139]mi[167]7500
  301. 7460 ix[178]id
  302. 7465 id[178]id[170]1:[139]id[177]o1[167]id[178]1
  303. 7466 [141]300
  304. 7470 [139]pr$[178][199](255)[167]id[178]ix:[137]7500
  305. 7480 [139]pr$[179][177]id$[167]7465
  306. 7490 co$[178]"+":id[178]ix:[137]7510
  307. 7500 co$[178]"-"
  308. 7510 [141]400:[141]700
  309. 7520 ko[178]id:mi[178]0
  310. 7600 [130]
  311. 7610 [160]2
  312. 7620 [159]2,8,2,"diskfile,l
  313. 7630 i$=i1$:di=dn:fr=d:gosub460:gosub700
  314. 7700 close2:gosub550:close15:gosub600:goto1000
  315. 7998 rem  ----  "[211]peicherinfo"  ----
  316. 8000 gosub900
  317. 8010 open15,8,15,"i":gosub700
  318. 8020 print"[211]peicherinformationen:"
  319. 8030 gosub500
  320. 8040 print,"   frei   geloescht   belegt":print
  321. 8050 print"[196]isketten:   ";
  322. 8051 printright$("    "+str$(si(0)),4)"        -       ";
  323. 8052 printright$("    "+str$(si(1)),4)
  324. 8060 print"[208]rogramme:   ";
  325. 8061 printright$("    "+str$(si(2)),4)"     ";
  326. 8062 printright$("    "+str$(si(3)),4)"       ";
  327. 8063 printright$("    "+str$(si(4)),4)
  328. 8100 close15:gosub600:goto1000
  329. 8998 rem   --- "[198]ile loeschen" ---
  330. 9000 gosub900
  331. 9010 open15,8,15:gosub500:open2,8,2,"progfile,l":gosub700
  332. 9020 input"[208]rogrammname";id$:gosub100:
  333. 9025 gosub300
  334. 9030 ifpr$=id$then9100
  335. 9040 ifpr$<>chr$(255)then9050
  336. 9045 print"[208]rogramm nicht vorhanden.":close2:close15:goto1000
  337. 9050 id=id+1:ifid>o1thenid=1
  338. 9060 goto9025
  339. 9100 close2
  340. 9110 open2,8,2,"diskfile,l"
  341. 9120 gosub360:dd=ne:d3=di:gosub900
  342. 9130 print"[208]rogamm   "hk$id$hk$
  343. 9135 close2
  344. 9140 print"[196]iskette  "hk$na$hk$" "in$
  345. 9150 print:print"< 1 >  [204]oeschen
  346. 9160 [139]co$[178]"+"[167][153]"< 2 >  atnnderes (NULL)rogramm loeschen
  347. 9170 print"< 0 >  [218]urueck zum [200]auptmenue
  348. 9180 [153]"right$hre (NULL)ahl? ";
  349. 9190 [141]800
  350. 9200 [139]e$[178]"0"[167][160]15:[137]1000
  351. 9210 [139]e$[178]"1"[167]9300
  352. 9220 [139]e$[179][177]"2"[167]9190
  353. 9230 [139]co$[179][177]"+"[167]9190
  354. 9240 [159]2,8,2,"progfile,l":[137]9050
  355. 9300 si(3)[178]si(3)[170]1:si(4)[178]si(4)[171]1
  356. 9310 [159]2,8,2,"progfile,l"
  357. 9320 [141]300:n2[178]ne:i2[178]id
  358. 9330 id$[178]dl$:[141]400:[141]700:[139]co$[178]"+"[167]9400
  359. 9340 id$[178]pr$:[141]100:[139]id[178]i2[167]9400
  360. 9350 fl[178]id:id[178]i2
  361. 9360 id[178]id[171]1:[139]fl[177]id[167]9400
  362. 9370 [141]300:[139]pr$[179][177]id$[167]9360
  363. 9380 dn[178]di:ko[178]ne:co$[178]"-":[141]400:[141]700
  364. 9400 [139] dd[179][177]i2 [167]9500
  365. 9410 [160]2:[159]2,8,2,"diskfile,l":[141]700
  366. 9420 di[178]d3:[141]360
  367. 9430 di$[178]na$:i$[178]in$:ko[178]n2:[141]460:[141]700
  368. 9440 [137]9600
  369. 9500 id[178]dd:[141]300
  370. 9520 [139]ne[179][177]i2[167]id[178]ne:[141]300:[137]9520
  371. 9530 dn[178]d3:ko[178]n2:id$[178]pr$:[141]400:[141]700
  372. 9600 [160]2:[141]550:[160]15:[153]:[153]"(NULL)rogramm geloescht"
  373. 9610 [141]600:[137]1000
  374.